import fetch from '@/utils/fetch'
import { removeDateTime } from "@/filters";

export function createdOperator(data) {
    return fetch({
        url: '/api/upms/menu_operator/add',
        method: 'post',
        data
    })
}

export function updatedOperator(data) {
    data = removeDateTime(data)
    return fetch({
        url: '/api/upms/menu_operator/update',
        method: 'post',
        data
    })
}

export function deletedOperator(id) {
    return fetch({
        url: '/api/upms/menu_operator/delete/'+id,
        method: 'get'
    })
}

export function fetchOperatorObject(id) {
    return fetch({
        url: '/api/upms/menu_operator/get/'+id,
        method: 'get'
    })
}

export function fetchOperatorList(query) {
    return fetch({
        url: '/api/upms/menu_operator/list',
        method: 'get',
        params: query
    })
}

